﻿using System;
using System.Linq;
using System.Text;
using SqlSugar;

namespace DongFangGuoKai.WMSPlatform.Domain.Models
{
    ///<summary>
    ///货品与包装关系表，容器与容器的关系，容器与货品的关系，货品与货品的关系等记录表
    ///</summary>
    [SugarTable("DBO.t_PackageDetail")]
    public partial class t_PackageDetail
    {
        public t_PackageDetail()
        {


        }
        /// <summary>
        /// Desc:明细Id
        /// Default:
        /// Nullable:False
        /// </summary>           
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// Desc:垛存储Id
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? StackingStorageId { get; set; }

        /// <summary>
        /// Desc:状态：0-失效；1-生效
        /// Default:1
        /// Nullable:True
        /// </summary>           
        public int? Status { get; set; }

        /// <summary>
        /// Desc:关联单详情Id
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? RelatedOrderDetailId { get; set; }

        /// <summary>
        /// Desc:物料Id
        /// Default:
        /// Nullable:True
        /// </summary>           
        public long? MaterialId { get; set; }

        /// <summary>
        /// Desc:物料号
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? MaterialCode { get; set; }

        /// <summary>
        /// Desc:物料名称
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? MaterialName { get; set; }

        /// <summary>
        /// Desc:包装类型：1-容器；2-货品
        /// Default:1
        /// Nullable:True
        /// </summary>           
        public int? PackageClass { get; set; }

        /// <summary>
        /// Desc:物料关键字Id
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? MaterialKeyId { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? BatchNO { get; set; }

        /// <summary>
        /// Desc:数量
        /// Default:
        /// Nullable:True
        /// </summary>           
        public decimal? QTY { get; set; }

        /// <summary>
        /// Desc:物料基本单位Id
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? UnitId { get; set; }

        /// <summary>
        /// Desc:物料基本单位
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? UnitName { get; set; }

        /// <summary>
        /// Desc:收货最小单位与最小发货单位的转换因子：（收货除以发货单位）。计算公式为：通过物料的计量单位表中与基本单位转换
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? ConvertFigre { get; set; }

        /// <summary>
        /// Desc:物料条码：可以是容器条码或货品条码
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? Barcode { get; set; }

        /// <summary>
        /// Desc:该物料所在垛的X坐标：如果为最底层托盘则0
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? PositionX { get; set; }

        /// <summary>
        /// Desc:该物料所在垛的Y坐标：如果为最底层托盘则0
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? PositionY { get; set; }

        /// <summary>
        /// Desc:该物料所在垛的Z坐标：如果为最底层托盘则0
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? PositionZ { get; set; }

        /// <summary>
        /// Desc:第几层包装：最外层为1
        /// Default:1
        /// Nullable:True
        /// </summary>           
        public int? LayerIndex { get; set; }

        /// <summary>
        /// Desc:父包装Id
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? ParentId { get; set; }

        /// <summary>
        /// Desc:备注
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? Remark { get; set; }

        /// <summary>
        /// Desc:创建时间
        /// Default:DateTime.Now
        /// Nullable:True
        /// </summary>           
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// Desc:包装条码
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? PackageCode { get; set; }

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:True
        /// </summary>           
        public bool? IsStocktake { get; set; }

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public bool HasSkuDetail { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public decimal? SkuNum { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? BarcodeRange { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public int? CreateUserId { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string? CreateUserName { get; set; }

    }
}
